import i18n from '@/common/lang'

export const columns = [
  {
    label: i18n.t('orderSynergy.purchase.purchaseNumber'),
    minWidth: 150,
    prop: 'number',
    fixed: true
  },
  {
    label: '订单类型',
    minWidth: 120,
    prop: 'orderType'
  },
  {
    label: i18n.t('orderSynergy.purchase.purchaseOrg'),
    minWidth: 140,
    prop: 'purchaseOrg'
  },
  {
    label: i18n.t('orderSynergy.purchase.purchaseTeam'),
    minWidth: 140,
    prop: 'purchaseTeam'
  },
  {
    label: i18n.t('orderSynergy.purchase.quantity'),
    minWidth: 100,
    prop: 'totalQuantity'
  },
  {
    label: i18n.t('orderSynergy.purchase.amount'),
    minWidth: 120,
    prop: 'totalAmount'
  },
  {
    label: i18n.t('orderSynergy.purchase.createId'),
    minWidth: 100,
    prop: 'createName'
  },
  {
    label: i18n.t('orderSynergy.purchase.createTime'),
    minWidth: 170,
    prop: 'createTime'
  },
  {
    label: i18n.t('orderSynergy.purchase.orderState'),
    width: 80,
    prop: 'state'
  }
]

export const actions = [
  {
    key: 'detail',
    text: i18n.t('common.view'),
    permissions: 'orderSynergy:purchase:detail'
  },
  {
    key: 'confirm',
    text: '确认',
    permissions: 'orderSynergy:purchase:confirm'
  }
  // {
  //   key: 'refuse',
  //   text: '拒绝',
  //   permissions: 'orderSynergy:purchase:refuse'
  // }
]

// 对账明细列表
export const materialColumns = [
  {
    label: '序号',
    width: 50,
    prop: 'lineNumber',
    fixed: true
  },
  {
    label: '来源单号',
    minWidth: 150,
    prop: 'sourceNumber',
    fixed: true
  },
  {
    label: '来源类型',
    minWidth: 140,
    prop: 'sourceType'
  },
  {
    label: '物料编码',
    minWidth: 140,
    prop: 'materialCode'
  },
  {
    label: '物料名称',
    minWidth: 140,
    prop: 'materialName'
  },
  {
    label: '物料规格',
    minWidth: 140,
    prop: 'materialSpecs'
  },
  {
    label: '物料分类',
    minWidth: 140,
    prop: 'materialType'
  },
  {
    label: '单位',
    minWidth: 80,
    prop: 'materialUnit'
  },
  {
    label: '需求数量',
    minWidth: 100,
    prop: 'quantity'
  },
  {
    label: '剩余发货数量',
    minWidth: 100,
    prop: 'remainingQuantity'
  },
  {
    label: '单价(不含税)(元)',
    minWidth: 130,
    prop: 'untaxedPrice'
  },
  {
    label: '税率/%',
    minWidth: 80,
    prop: 'taxRate'
  },
  {
    label: '单价(含税)/元',
    minWidth: 120,
    prop: 'unitPrice'
  },
  {
    label: '小计',
    minWidth: 100,
    prop: 'totalPrice'
  },

  {
    label: '期望交货日期',
    minWidth: 170,
    prop: 'deliveryDate'
  },
  {
    label: '收货库房',
    minWidth: 170,
    prop: 'addrName'
  },
  {
    label: '库房地址',
    minWidth: 170,
    prop: 'address'
  },
  {
    label: '库房负责人',
    minWidth: 100,
    prop: 'contacts'
  },
  {
    label: '联系电话',
    minWidth: 120,
    prop: 'contactsPhone'
  }
]
